﻿using System;
using System.Web.Mvc;

namespace FBGraph.Web.Mvc
{
    /// <summary>Provides master view pages with access to FBGraph.NET functionality.</summary>
    public class FBGraphViewMasterPage : ViewMasterPage
    {
        /// <summary>Gets a reference to the current <see cref="FBGraphHttpContext" />.</summary>
        public FBGraphHttpContext FbContext { get { return FBGraphHttpContext.Current(ViewContext.HttpContext); } }
    }

    /// <summary>Provides master view pages with access to FBGraph.NET functionality.</summary>
    public class FBGraphViewMasterPage<TModel> : ViewMasterPage<TModel>
        where TModel : class
    {
        /// <summary>Gets a reference to the current <see cref="FBGraphHttpContext" />.</summary>
        public FBGraphHttpContext FbContext { get { return FBGraphHttpContext.Current(ViewContext.HttpContext); } }
    }
}